#include<iostream>
#include<vector>
#include<climits>
using namespace std;

int main()
{
    int n = 0, x = 0;
    cin >> n >> x;
    vector<int> v(n+1);
    for(int i=1; i<=n; i++)
        cin >> v[i];

    int left = 0, right = 0, sum = 0, len = INT_MAX;
    int begin = 0, end  = 0;
    while(right <= n)
    {
        sum += v[right];
        while(sum >= x)
        {
            if(right-left+1 < len)
            {
                len = right-left+1;
                begin = left;
                end = right;
            }
            sum -= v[left++];
        }
        right++;
    }
    cout << begin << " " << end << endl;
    return 0;
}
